<?php


namespace app\common\cachemodel;


use app\common\lib\exception\ApiException;
use app\common\model\BaseCache;

class ZlSynastryReportText extends BaseCache
{
    protected $table = 'wechat_backup_07_18_14_43_00.zl_synastry_report_text';

    protected $cacheModel = 'synastry.report_text';

    /**
     * 重写数据时获取数据
     * @param $ids
     * @param $type
     * @param $sortType
     * @return array
     * @throws ApiException
     */
    public function getInfoByIdsInData($ids, $type, $sortType)
    {
        try
        {
            $data = $this->where(['code' => ['in', $ids], 'status' => 1])->column('text,text2','code');
        }
        catch (\Exception $e)
        {
            $data = [];
        }

        return $data;
    }
}
